package com.example.online_exam_system.service.impl;

import com.example.online_exam_system.dto.QuestionsDto;
import com.example.online_exam_system.dao.TestQuestionsDao;
import com.example.online_exam_system.service.TestQuestionsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * (TestQuestions)表服务实现类
 *
 * @author lianglong@asiainfo.com
 * @since 2021-11-27 09:55:06
 */
@Service("testQuestionsService")
public class TestQuestionsServiceImpl implements TestQuestionsService {
    @Resource
    private TestQuestionsDao testQuestionsDao;


    @Override
    public List<QuestionsDto> getQuestionsByTeacherId() {
        return testQuestionsDao.getQuestionsByTeacherId();
    }

    @Override
    public int insertQuestion(QuestionsDto questionsDto) {
        return testQuestionsDao.insertQuestion(questionsDto);
    }

    @Override
    public int updateQuestion(Map<String, Object> inParam) {
        return testQuestionsDao.updateQuestion(inParam);
    }

    @Override
    public int deleteQuestion(Map<String, Object> inParam) {
        return testQuestionsDao.deleteQuestion(inParam);
    }

    @Override
    public List<QuestionsDto> getQuestionsBySubjectId(Map<String,Object> inParam) {
        return testQuestionsDao.getQuestionsBySubjectId(inParam);
    }

    @Override
    public Map<String, Object> getQuestionsByQuestionId(String questionId) {
        return testQuestionsDao.getQuestionsByQuestionId(questionId);
    }



}
